import type { RouteRecordRaw } from "vue-router";

export default [
  {
    path: "/sys/login",
    component: () => import("@/pages/admin/sys/login.vue"),
    meta: { title: "登录" }
  },
  {
    path: "/",
    redirect: "/home/dashboard",
    component: () => import("@/layouts/admin.layout/index.vue"),
    children: [
      {
        path: "/home/dashboard",
        component: () => import("@/pages/admin/home/dashboard.vue"),
        meta: { title: "仪表盘" }
      },
      {
        path: "/user/index",
        component: () => import("@/pages/admin/user/index.vue"),
        meta: { title: "用户管理" }
      },
      {
        path: "/user/info",
        component: () => import("@/pages/admin/user/info.vue"),
        meta: { title: "个人中心" }
      },
      {
        path: "/developer/index",
        component: () => import("@/pages/admin/developer/index.vue"),
        meta: { title: "开发者管理" }
      },
      {
        path: "/devApp/index",
        component: () => import("@/pages/admin/devApp/index.vue"),
        meta: { title: "开发者应用管理" }
      },
      {
        path: "/developer/info",
        component: () => import("@/pages/admin/developer/info.vue"),
        meta: { title: "申请开发者" }
      },
      {
        path: "/dict/dictType",
        component: () => import("@/pages/admin/dict/dictType.vue"),
        meta: { title: "字典类型管理" }
      },
      {
        path: "/dict/dictData",
        component: () => import("@/pages/admin/dict/dictData.vue"),
        meta: { title: "字典值管理" }
      },
      {
        path: "/permission/index",
        component: () => import("@/pages/admin/permission/index.vue"),
        meta: { title: "权限管理" }
      },
      {
        path: "/role/index",
        component: () => import("@/pages/admin/role/index.vue"),
        meta: { title: "角色管理" }
      },
      {
        path: "/menu/index",
        component: () => import("@/pages/admin/menu/index.vue"),
        meta: { title: "菜单管理" }
      },
      {
        path: "/menuGroup/index",
        component: () => import("@/pages/admin/menuGroup/index.vue"),
        meta: { title: "菜单组管理" }
      },
      // {
      //   path: "/article/index",
      //   component: () => import("@/pages/admin/article/index.vue"),
      //   meta: { title: "文章管理" }
      // },
      {
        path: "/icon/index",
        component: () => import("@/pages/admin/icon/index.vue"),
        meta: { title: "图标管理" }
      },
      // 表单页面
      {
        path: "/form",
        component: () => import("@/layouts/admin.layout/form.vue"),
        children: [
          {
            path: "/user/form",
            component: () => import("@/pages/admin/user/form.vue"),
            meta: { title: "用户信息" }
          },
          // {
          //   path: "/article/form",
          //   component: () => import("@/pages/admin/article/form.vue"),
          //   meta: { title: "文章信息" }
          // },
          {
            path: "/dict/dictTypeForm",
            component: () => import("@/pages/admin/dict/dictTypeForm.vue"),
            meta: { title: "字典类型维护" }
          },
          {
            path: "/dict/dictDataForm",
            component: () => import("@/pages/admin/dict/dictDataForm.vue"),
            meta: { title: "字典值维护" }
          },
          {
            path: "/permission/form",
            component: () => import("@/pages/admin/permission/form.vue"),
            meta: { title: "权限维护" }
          },
          {
            path: "/role/form",
            component: () => import("@/pages/admin/role/form.vue"),
            meta: { title: "角色维护" }
          },
          {
            path: "/devApp/form",
            component: () => import("@/pages/admin/devApp/form.vue"),
            meta: { title: "开发者应用维护" }
          },
          {
            path: "/menu/form",
            component: () => import("@/pages/admin/menu/form.vue"),
            meta: { title: "菜单维护" }
          },
          {
            path: "/menuGroup/form",
            component: () => import("@/pages/admin/menuGroup/form.vue"),
            meta: { title: "菜单组维护" }
          },
        ]
      },
      // 公共页面
      { path: "/404", component: () => import("@/pages/com/404.vue") }
    ]
  }
] as RouteRecordRaw[];
